package com.topgay.dao;

import java.sql.SQLException;
import java.util.List;

import com.topgay.domain.Member;

public interface MemberDAO {
	public abstract Member selectMemberById(String id) throws SQLException;
	public abstract int insertMember(Member member) throws SQLException;
	public abstract int updateMember(Member member) throws SQLException;
	public abstract int deleteMemberById(String id) throws SQLException;
	public abstract Member selectMemberByNickname(String nickname) throws SQLException;
	public abstract int updateLoginCheck(String id) throws SQLException;
	public abstract int updateLogoutCheck(String id) throws SQLException;
	public abstract Member findMemberById(String name, String hp) throws SQLException;
	public abstract Member findMemberByPw(String id, String name, String hp) throws SQLException;
	
	/**
	 * 전체 회원 목록 조회
	 * @param page
	 * @param role - user / admin
	 * @return
	 */
	public abstract List<Member> selectMemberList(int page, String role);
	
	/**
	 * 전체 회원 수 조회
	 * @param role - user / admin
	 * @return
	 */
	public abstract int selectTotalContent(String role);
	
	/**
	 * id로 한명의 회원정보를 조회하는 메소드
	 * @param id
	 * @return
	 */
	public abstract Member selectMemberContentById(String id);
}
